<html>
<title>Pause Window</title>
<style>body{margin-top:10}</style>
<body scroll="no">

<center style='font-size:14px;font-weight:bold'>
	The window will automatically <br> close in <span id="time"></span>&nbsp;second(s).
</center>

<script type="text/javascript">
	var ms = window.dialogArguments.SleepInterval;

	function wait(){
		var span = document.getElementById('time');
		span.innerHTML = (ms / 1000);
		setInterval(function(){ closeWindow(); }, ms);
		setInterval(function(){ ms -= 1000; if(ms > 0) span.innerHTML = (ms / 1000); }, 1000);
	}
	
	function closeWindow(){
	 	window.close()
	}
	wait();
</script>
</body>
</html>